package com.sikaryofficial.workbench.constant;

import lombok.Getter;

@Getter
public enum OrderProcessTypeEnum {

    CONTRACT(1, "合同签署"),
    DOWN_PAYMENT(2, "定金"),
    FINAL_PAYMENT(3, "尾款");

    private final Integer code;
    private final String desc;

    OrderProcessTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static OrderProcessTypeEnum getOrderProcessTypeByCode(Integer code) {
        for (OrderProcessTypeEnum orderProcessTypeEnum : values()) {
            if (orderProcessTypeEnum.getCode().equals(code)) {
                return orderProcessTypeEnum;
            }
        }
        return null;
    }

}
